package com.zp.self.module.level_1_问道.III_多线程.JUC;

import java.util.concurrent.locks.LockSupport;

/**
 * @author ：by Zeng Peng
 * @date ：Created 2022/8/8 8:06
 * @description ：
 */
public class LockSupportTest {
    public static void main(String[] args) {
        System.out.println(LockSupport.getBlocker(Thread.currentThread()));
        System.out.println(LockSupport.getBlocker(new Thread(() -> System.out.println("s"))));
        //锁定当前线程
        LockSupport.park();
        //设置当前线程的parkBlocker字段
        LockSupport.park("");
    }
}
